package org.tabularium.util;

/**
 * Classes implement this interface to let threads (mostly binded to GUI
 * progress indicators) know the status of a long process.
 * 
 * @author Fabio Gasparetti
 * 
 */
public interface ProgressMonitor {
	/**
	 * If value is greater than 0, it is the current progress percentage.
	 * Usually, at 100 task should be considered done. If value is less than 0,
	 * the abs value usually represents the number of items analyzed, e.g.,
	 * downloaded documents.
	 */
	public long getCurrent();

	public boolean taskDone();

	/**
	 * Returns an object related to the current task, e.g., a label related to the current activity.
	 * It is useful when a single class has many activities running to monitor.
	 */
	public Object getTaskId();
}
